﻿#region using statements

using Microsoft.Xna.Framework.Graphics;

using NGen;

using TowerDefense.Objects.Enemies;
using TowerDefense.Objects.Towers;

#endregion

namespace TowerDefense.Objects.Projectiles
{
	/// <summary>
	/// 	the ice projectile
	/// </summary>
	public class GameObjectProjectileIce : GameObjectProjectileBase
	{
		public GameObjectProjectileIce(GameObjectEnemyBase p_enemy, GameObjectTowerBase p_tower) : base(p_enemy, p_tower) {}

		/// <summary>
		/// 	Abstract method which is implemented by each specific type of
		/// 	projectile to apply its own special effects upon reaching the
		/// 	target
		/// </summary>
		protected override void _TargetHit() {
			m_targetEnemy.ApplyIce(0.2f + (m_projectileLevel * 0.1f));
		}

		/// <summary>
		/// 	_Initialize this projectile
		/// </summary>
		protected override void _Initialize() {
			Velocity = 150;
			Damage = m_firedByTower.AttackDamage;
			m_texture = GameEngine.GameContent.Load<Texture2D>("Content\\Textures\\Projectiles\\ice" + m_projectileLevel);
			base._Initialize();
		}
	}
}